package sharedspace;

import java.io.Serializable;

/**
 * User entity - all details of user
 * @author G3
 *
 */
public class User implements interfacep.User,Serializable {
	
	private static final long serialVersionUID = 1L;
	public static int NUM_OF_COLUMNS = 7;
	private String userID;
	private String userLastName;
	private String userFirstName;
	private String userPassword;
	private int userPermission;
	private boolean userLogged;
	private String userStatus;
	
	
	public User(){
		
	};
	
	public String getUserID() {
		return userID;
	}

	public void setUserID(String userID) {
		this.userID = userID;
		
	}

	public String getUserLastName() {

		return userLastName;
	}

	public void setUserLastName(String userLastName) {		
		userLastName = new String(userLastName.substring(0, 1).toUpperCase()+userLastName.substring(1).toLowerCase());
		this.userLastName = userLastName;
	}

	public String getUserFirstName() {
		return userFirstName;
	}

	public void setUserFirstName(String userFirstName) {
		userFirstName = new String(userFirstName.substring(0, 1).toUpperCase()+userFirstName.substring(1).toLowerCase());
		this.userFirstName = userFirstName;
	}

	public String getUserPassword() {
		return userPassword;
	}

	public void setUserPassword(String userPassword) {
		this.userPassword = userPassword;
	}

	public int getUserPermission() {
		return userPermission;
	}

	public void setUserPermission(int userPermission) {
		this.userPermission = userPermission;
	}

	public Boolean getUserLogged() {
		return userLogged;
	}

	public void setUserLogged(Boolean userLogged) {
		this.userLogged = userLogged;
	}

	public String getUserStatus() {
		return userStatus;
	}

	public void setUserStatus(String userStatus) {
		this.userStatus = userStatus;
	}	
	
	public void printUser()
	{
		System.out.println(this.userID + " " + this.userFirstName + " ");
	}

}
